package com.design.pattern.flyweight.jdk;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * @version 1.0
 * @author: CRM_SYSTEM
 * @date: 2022/10/18 22:50
 * @Description:
 */
public class IntegerTest {

    private static final String DateTimeFormat = "yyyy-MM-dd";
    private static final String DateTimeFormat1 = "yyyy-MM-dd HH:mm:ss";


    public static void main(String[] args) {
//        Integer a=Integer.valueOf(100);
//        Integer b=100;
//        System.out.println(a==b);
//        Integer c=Integer.valueOf(1000);
//        Integer d=1000;
//        System.out.println(c==d);

        int second = DateUtil.second(new Date());
        System.out.println(second);

        DateUtil.beginOfDay(new Date()).getTime();
        if (new Date().getTime()>DateUtil.beginOfDay(new Date()).getTime()){
            System.out.println(1231);
        }

        DateTime startTime = DateUtil.parse("2022-11-30", DateTimeFormat);
        DateTime startTime1 = DateUtil.parse("2022-11-25 10:23:00", DateTimeFormat1);
        DateTime startTime2 = DateUtil.parse("2022-11-26 11:00:00", DateTimeFormat1);

        long l = DateUtil.betweenDay(startTime1, startTime2, true);

        System.out.println(l);
//
//        System.out.println(DateUtil.format(new Date(),DateTimeFormat));
//
//
//        DateTime dateTime = DateUtil.offsetDay(new Date(), -2);
//
        DateTime startTimedateTime = DateUtil.offsetDay(new Date(), -2);
        System.out.println(DateUtil.format(startTimedateTime,DateTimeFormat));
//        System.out.println(DateUtil.format(startTimedateTime,DateTimeFormat));
//
//
//        long a= DateUtil.betweenDay(dateTime, new Date(), true);
//        System.out.println(a);

//        System.out.println(startTime.getTime());
//        System.out.println(DateUtil.beginOfDay(new Date()).getTime());
//
//        if (startTime.getTime()>DateUtil.beginOfDay(new Date()).getTime()){
//            System.out.println(1231241234);
//        }
//
//        DateTime dateTime = DateUtil.beginOfSecond(new Date());
//        System.out.println(dateTime);



//        String dateTimeFormat = DateUtil.format(dateTime, DateTimeFormat1);
//
//        String timeSql = "( ( redistribute_time is  NULL  and  create_time < ' " + dateTimeFormat +
//                "' ) or ( redistribute_time = 10790002 and redistribute_time < ' " + dateTimeFormat + "' ) ) ";
//
//        System.out.println(timeSql);
//
//        System.out.println(dateTimeFormat);
//        long betweenDay = DateUtil.betweenDay(dateTime, new Date(), true);
//        System.out.println(betweenDay);

    }
}
